package com.example.demo.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.example.demo.entity.Person;
import com.example.demo.service.PersonService;

@Controller
@RequestMapping("person")
public class PersonController {
	
	@Resource
	private PersonService pService;
	
	@RequestMapping("update")
	public String editPerson(Person person) {
		pService.update(person);
		return "redirect:http://localhost/person/findAll";
	}
}
